package com.df.springmvc.system.manage.dao;

import java.util.List;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;
import com.df.springmvc.supper.SupperDao;

/**
 * 本类只做数据库操作处理
 * @author David
 */
@Repository
public class LogoutDao extends SupperDao{
	String getUser="";
	
	/**
	 * @param args
	 */
	public List<Object> getUserInfo(){
		System.out.println(11122121);
		Session session=getSessionFactory().getCurrentSession();
		System.out.println(session);
		SQLQuery query=session.createSQLQuery("select * from s_user where 1=1 or loginname=:u and password=:p");
		query.setString("u","admin");
		query.setString("p","MD5_232F297A57A5A743894A0E4A801FC3");
		query.setMaxResults(20);
		query.setFirstResult(1);
		// add(schema,map)
		// add("",null);
		return query.list();
	}
	public String getGetUser(){
		return getUser;
	}
	public void setGetUser(String getUser){
		this.getUser=getUser;
	}
}
